import request from '@/utils/request'

export function roleList(query) {
  return request({
    url: '/role/roleList',
    method: 'post',
    data: query
  })
}

export function createRole(data) {
  return request({
    url: '/role/createRole',
    method: 'post',
    data: data
  })
}

export function updateRole(data) {
  return request({
    url: '/role/updateRole',
    method: 'post',
    data
  })
}

export function deleteRole(id) {
  return request({
    url: `/role/deleteRole/${id}`,
    method: 'get'
  })
}
